package ru.study.jdbc.dao;

import java.sql.Connection;  
import java.sql.SQLException;


public class DaoManager {	
	private static DAO dao =  DaoManager.getMySQLConnection(); 
	
	private DaoManager() {}	
	
	public static DAO getDao() {
		return dao;
	}
	
	private  static MySqlDAOImpl getMySQLConnection() {		
		MySqlDAOImpl mydao = null;
		try {
			mydao = MySqlDAOImpl.getInstance();
		} catch (SQLException e) {		
			e.printStackTrace();
		}
		return mydao;
	}	
		
	
 
}
